//
//  LanguageClass.m
//  MartketNote
//
//  Created by Nguyen Minh Giang on 2/14/14.
//  Copyright (c) 2014 Nguyen Minh Giang. All rights reserved.
//

#import "LanguageClass.h"

@implementation LanguageClass

+ (NSDictionary *) getLanguageDictionary
{
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"language" ofType:@"plist"];
    return [[NSDictionary alloc] initWithContentsOfFile:filePath];
}

+ (NSString *) getStringWithLanguge:(int)language withKey:(NSString *)key
{
    NSDictionary *languageDic = [self getLanguageDictionary];
    NSDictionary *dictionary;
    switch (language)
    {
        case LANGUAGE_VI:
        {
            dictionary = [languageDic valueForKey:VIETNAMESE];
            break;
        }
        case LANGUAGE_EN:
        {
            dictionary = [languageDic valueForKey:ENGLISH];
            break;
        }
    }
    return [dictionary valueForKey:key];
}



@end
